package test;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;

import JDBC.DATABASE;
public class test {
	public static void main(String[] args) throws SQLException{
	/*	String sql="select PASSWORD,TELE from users where ACCOUNT='MINHUA'";
		//String sql="select * from users";
		//DATABASE.query(sql);
		ResultSet rs = DATABASE.query(sql);
		try {
			while (rs.next()) {
				//String account = rs.getString("ACCOUNT");
				//String name = rs.getString("NAME");
				String password = rs.getString("PASSWORD");
				String tele = rs.getString("TELE");
				//String mail = rs.getString("MAIL");
		        System.out.println(password);
		        System.out.println(tele);
				//System.out.println(account+ "\t" + name +"\t" + password + "\t" + tele + "\t" + mail );
			}
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}	*/
		
	/*	Connection conn=DATABASE.getConnection();
		CallableStatement cs=conn.prepareCall("{call book_num(?,?,?)}"); 
		cs.setString(1,"00055");
		cs.setString(2,"��ԤԼ");
		cs.registerOutParameter(3,Types.INTEGER); 
		cs.execute();
		cs.getInt(3);
		System.out.print(cs.getInt(3));*/
		Connection conn=DATABASE.getConnection();
		/*CallableStatement cs=conn.prepareCall("{call p_msg.displayuser(?)}"); 
		 cs.registerOutParameter(1, oracle.jdbc.OracleTypes.CURSOR);
		   boolean bool = cs.execute();
		   ���ý���
		   System.out.println(bool);
		   ResultSet rs = (ResultSet)cs.getObject(1); 
		   while(rs.next()){
		    System.out.print(rs.getString("ACCOUNT") + " ");
		    System.out.print(rs.getString("NAME") + " ");
		    System.out.println(rs.getString("TELE")+" ");
		    System.out.println(rs.getString("PASSWORD")+" ");
		    System.out.println(rs.getString("MAIL"));
		    
		    
		   }
		
		
		*/
		
	}
}
